#ifndef MYCOIN_H
#define MYCOIN_H

#include <QPushButton>
#include <QTimer>

class MyCoin : public QPushButton
{
    Q_OBJECT
public:
//    explicit MyCoin(QWidget *parent = nullptr);
    explicit MyCoin(QString btnImg);

    int getX();
    int getY();
    void setX(int x);
    void setY(int y);
    int flag;

    QTimer *timer1;
    QTimer *timer2;
    void changFlag();
    int min = 1;
    int max = 8;
    bool isAnimation = false;
    bool isWin = false;

    void mousePressEvent(QMouseEvent *e);

private:
    //金币属性
    int posX;
    int posY;

signals:

public slots:
};

#endif // MYCOIN_H
